package com.jintian.smart.kernel.flowable.flowable.service;

import org.flowable.engine.runtime.ProcessInstance;

/**
 * 流程实例查询相关封装
 */
public interface IProcessQuery {
    /**
     * 查询流程实例
     *
     * @param processInstanceId 流程实例标识
     * @return
     */
    public ProcessInstance processInstanceId(String processInstanceId);

    /**
     * 查询流程实例
     *
     * @param processInstanceBusinessKey 流程实例业务键名
     * @return
     */
    public ProcessInstance processInstanceBusinessKey(String processInstanceBusinessKey);

    /**
     * 判断流程实例是否已结束
     *
     * @param processInstanceId 流程实例标识
     * @return
     */
    public boolean hasProcessInstanceFinished(String processInstanceId);
}
